1. Field of the Invention
The present invention is directed to a system and method which provides a software engineer with a tool to create a graphical user interface (GUI) which can be easily modified and reused with a Windows™ programming system or other system capable of supporting GUIs.
2. Discussion of the Backgound The Integrated Development Environment (IDE), or the Visual C/C++ Studio of Microsoft™ Visual C/C++ is an industrial standard for software developers to build graphical user interfaces (GUIs) which may be major portions of software products. A software engineer can easily build his or her GUI objects by utilizing a standard mouse and/or keyboard action via What You See Is What You Get (WYSIWYG) techniques. The IDE automatically generates a corresponding resource file which is a text script describing the properties which the software engineer has visually designed. IDE and Visual C++ are described, for example, in the books “Microsoft Visual C++ Development System for Windows 95 and Windows NT Version 4,” by Microsoft Corporation, from Microsoft Press, 1995 and “Programming Windows 95” by Charles Petzgold, from Microsoft Press, 1996, both of which are incorporated herein by reference in their entirety.
In building a graphical user interface, a software engineer works with various objects such as dialog boxes for a variety of controls (e.g., a CHECKBOX, a COMBOBOX, a TEXT, a DEFPUSHBUTTON, etc.). Such dialog boxes are typically the most important objects of a Windows™ GUI. Other objects a software designer typically utilizes are string tables which define wording strings used in the GUI and graphics file names, e.g., for an icon (.ICO) and a picture (.BMP).
A conventional exemplary operation for a software engineer generating a GUI with Microsoft Visual C/C++ is shown in FIG. 1. As shown in FIG. 1, after beginning the construction of a GUI, a software engineer utilizes the IDE of Windows™ to create a resource file 10 by utilizing a visual GUI builder and a resource compiler and viewer. The software engineer also generates processing files 15 by utilizing Visual C/C++ and an editor/compiler/linker. The standard C/C++ Builder is then utilized on the generated resource files 10 and processing files 15 to create a Windows™ software product 5.
In the resource files 10, a dialog object is defined as a template which includes three different components (1)–(3) of (1) object geometry type, (2) object dimensions, and (3) other attributes. The object geometry type (1) indicates the type of object, such as a control type (e.g., EDITTEXT, GROUPBOX, LISTBOX, PUSHBUTTON, etc.). The object dimensions (2) typically utilize four-coupled absolute values to define an object window with the values: <x, y, width, height> in which x and y are coordinates of a point of an upper-left corner portion of a window, and the width and height indicate the width and height values of the window respectively. The other attributes (3) typically include a title/caption, visibility, graphic style, hot key, etc. Further, a PUSHBUTTON as an object geometry type may provide a link to a next level (e.g., child) dialog box.
As noted above, after forming the resource files 10 and the processing files 15, the software engineer utilizes the standard C/C++ Builder to generate the Windows™ software product 5.
In the system shown in FIG. 1 the resource files 10 are generated by the IDE in hard code, i.e., the resource files 10 are generated such that all the object (control) types, attributes, and dimensions are based on constant ID strings, constant name strings, and constant numbers. As a result of the hard coding of the resource files 10, it may be difficult and time consuming to modify such resource files 10. As examples, it is not usually an easy task to resize, reallocate, or rearrange dialogs around an existing GUI when generated in the hard coded manner as noted above, nor is it usually easy to internationalize an existing GUI for a number of foreign languages.
As an example of resource files generated with the conventional system of FIG. 1, attention is directed to FIGS. 5A–5B. FIG. 5A illustrates an exemplary calculator GUI 300 to be displayed on Windows 95. The calculator GUI 300 includes a title 302 which is displayed as “DispCalc (32-bit).” The actual display size of the calculator GUI 300 is approximately 2 inches by 3 inches in width and height, respectively. FIG. 5B illustrates an exemplary calculator icon 320 which is used to access the calculator GUI. The calculator icon 320 includes 3 rows and 4 columns of buttons, while the calculator GUI 300 includes 4 rows and 4 columns of buttons.
FIGS. 7A–7B illustrate a standard resource file 400 generated by a software designer building the calculator GUI 300 with the calculator icon 320 of FIGS. 5A–5B. As shown in FIGS. 7A–7B, the object control types, geometry types, dimensions, and other attributes are hard-coded. For example, with respect to a definition of a calculator PUSHBUTTON “0” a text 420, i.e. the values “9, 90, 14, 15”, correspond to the object dimensions x, y, width, height for the calculator PUSHBUTTON “0” as shown in FIG. 5A. A hard-coded text 418 of FIG. 7A defines the values “0, 0, 92, 114”, corresponding to the object dimensions x, y, width, height for the calculator 300 as shown in FIG. 5A. A hard-coded text 410 of FIG. 7A defines the file name “dispcalc.ico” of an icon for displaying the icon 320 shown in FIG. 5B. A hard-coded text 412 of FIG. 7A defines the caption “DispCalc (32-bit)” to be displayed as the calculator caption 302 shown in FIG. 5A.
As an example, it is desired to modify the calculator 300 displayed in FIG. 5A to be displayed as twice the size shown in FIG. 5A, and to modify the caption 302 displaying “DispCalc (32-bit)” to display “Calculator.” A calculator GUI 330 as shown in FIG. 6A shows the result of doubling the size of the calculator 300 of FIG. 5A, and of modifying the caption 302 to a caption 332 displaying “Calculator” in FIG. 6A. It is also desired to modify the icon 320 shown in FIG. 5B, which has three rows and four columns of buttons, to more accurately reflect the calculator to be displayed, which has four rows and four columns of buttons. A calculator icon 340 of FIG. 6B shows a modified icon having the desired four rows and four columns of buttons. As a result of the hard-coding of the resource file of FIGS. 7A–7B, it may be a time consuming operation for a software engineer to modify the resource files to obtain the modified calculator and icon displays of FIGS. 6A–6B.
To modify an existing hard-coded resource file, one usually manually changes all related objects including four-coupled dimensions, caption strings, object titles, words in the string tables, icon and bit map file names, etc. by using an appropriate editor.
There are several tasks which a software engineer may wish to execute in modifying resource files. As other examples, assume that a software engineer wishes to execute any of the following three tasks (1)–(3). In a first task (1), in a dialog window there is a button leading to a child-dialog. The first task (1) is to expand the dialog window, remove the child-dialog button, and move the child-dialog into the expanded parent-dialog window. The second task (2) relates to a localization or internationalization task that translates a resource file for a different language, such as translating a resource file from English to French. For example, a static text control may contain the phrase “Type up to eight alphanumeric characters” in English, and the task may be to translate that phrase to a longer sentence “Vous pouvez entrer 8 charactères alphanumériques” in French. The third task (3) may be zooming in or zooming out of the entire GUI complex of a windows application with a certain scale ratio.
Conventionally, each of the above tasks (1)–(3) is executed by a software engineer either by visually modifying a resource file opened with the IDE, or by manually changing all the dimension numbers.